<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="bocMain"/>
    <title>进件作业系统</title>
</head>

<body>
<header class="header-title">材料核验</header>

<g:form action="contactMaterialCheckSave" method="post" class="myForm">
    <input type="hidden" name="id" id="id" value="${this?.opportunity?.id}">
    <input type="hidden" name="opportunityFlexFieldCategoryId" value="${this?.opportunityFlexFieldCategory?.id}">

    <div class="weui-cells weui-cells_form weui-label-10">
        <g:each in="${com.next.OpportunityFlexField.findAllByCategory(opportunityFlexFieldCategory, [order:'asc', sort: 'displayOrder'])}">
            <g:if test="${it?.value == '是'}">
                <div class="weui-cell">
                    <div class="weui-cell__bd"><label class="weui-label">${it?.name}</label></div>
                    <div class="weui-cell__ft agree-group">
                        <g:checkBox name="${it?.name}" class="weui-agree__checkbox" value="${true}"/>
                    </div>
                </div>
            </g:if>
        </g:each>
        <br>

        <div id="othersItemsBtn" class="weui-btn weui-btn_mini weui-btn_primary" style="float: right;font-size: 1rem;background-color:#1987d5;border-radius: 10px ">新增验证</div>

        <div class="hide" id="othersDiv">
            <g:each in="${com.next.OpportunityFlexField.findAllByCategory(opportunityFlexFieldCategory, [order:'asc', sort: 'displayOrder'])}">
                <g:if test="${it?.value != '是'}">
                    <div class="weui-cell">
                        <div class="weui-cell__bd"><label class="weui-label">${it?.name}</label></div>
                        <div class="weui-cell__ft agree-group">
                            <g:checkBox name="${it?.name}" class="weui-agree__checkbox" value="${false}"/>
                        </div>
                    </div>
                </g:if>
            </g:each>
        </div>
    </div>
    <div class="bigBtn">
        <button type="submit" class="weui-btn weui-btn_primary" id="submit">下一步</button>
    </div>
</g:form>

<script>
    $(function () 
    {

        $("#othersItemsBtn").click(function() 
        {
            $('#othersDiv').removeClass("hide");
        })
    })
</script>
</body>
</html>
